@use '_mixins.scss';

.stream-participants-block {
    float: left;
    display: flex;
    align-items: center;
    margin: -10px 0 0 0;
    height: 100%;

    @include mixins.small-screen {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        margin: -20px 0 0 0;
    }

    .participants-container {
        position: relative;
        width: 292px;

        @include mixins.small-screen {
            width: 212px;
        }

        .participants-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-gap: 8px;
            width: 100%;

            @include mixins.small-screen {
                grid-gap: 4px;
            }

            &.single-column { grid-template-columns: 1fr; }

            .local-stream-node {
                /* [...] */

                &:hover .node-menu {
                    display: block;
                }

                .node-menu {
                    top: 8px;
                    right: 6px;
                    display: none;
                    z-index: 21;

                    &:hover .node-menu-content {
                        display: block;
                    }

                    i {
                        --icon-size: 16px;
                    }

                    &-toggle {
                        padding: 3px;
                        border-radius: 200px;
                    }

                    &-content {
                        display: none;

                        button {
                            display: flex;
                            align-items: center;

                            span {
                                padding: 0 0 0 10px;
                            }
                        }
                    }
                }
            }

            /* TODO: look into `.video-node` re: replicate and unify */
            .video-node {
                width: 100%;
                height: 100%;
                box-sizing: border-box;

                &.active {
                    border: 2px solid #6FD7FF;
                }

                .avatar-wrapper {
                    width: 32px;
                    min-width: 16%;
                    height: 32px;
                    font: var(--text-body1);
                }

                &-status {
                    bottom: 6px;
                    left: 6px;

                    span {
                        margin: 0 2px 0 0;
                    }
                }

                .stream-signifiers {
                    top: 6px;
                    left: 6px;

                    .stream-signifier-icon {
                        --icon-size: 18px;
                        --mask-color: var(--icon-rest);
                    }

                    span {
                        width: 24px;
                        height: 24px;
                        margin-inline-end: 2px;
                    }
                }

                .loading-icon {
                    width: 64px;
                    height: 64px;
                    margin-left: -32px;
                    margin-top: -32px;
                    filter: invert(0);
                }
            }
        }

        button.carousel-control {
            margin: 14px 0 0 13px;
            padding: 0;
            background: transparent;
            border: 0 none;
            cursor: pointer;
            z-index: 900;

            @include mixins.small-screen {
                position: absolute;

                &.carousel-button-prev { top: -44px; }
                &.carousel-button-next { bottom: -44px; }
            }

            i {
                --mask-color: var(--icon-rest);
                --icon-size: 44px;

                &:hover { --mask-color: var(--icon-active); }
            }
        }
    }
}
